package dynamicmenus;

import cruds.accessories.brand.BrandsList;
import cruds.accessories.brand.CrudCreateBrandDTO;
import home.Home;
import panels.DynamicMenu;
import panels.MyAjaxLink;
import services.BrandDTOService;

@SuppressWarnings("serial")
public class BrandModelMenu extends DynamicMenu{

	public BrandModelMenu(Home home) {
		super(home);
		this.setOutputMarkupId(true);
		BrandDTOService service = this.getHome().getGeneralService().getBrandSer();
		this.add(new MyAjaxLink("accessorybrands",new CrudCreateBrandDTO(home,"A")));
		this.add(new MyAjaxLink("acclist",new BrandsList(home,"A",service.getBrandsAndModels("A"))));
		this.add(new MyAjaxLink("tiresbrands",new CrudCreateBrandDTO(home,"N")));
		this.add(new MyAjaxLink("tireslist",new BrandsList(home,"N",service.getBrandsAndModels("N"))));
	}

}
